import { createRouter, createWebHashHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";
import list from "../views/list.vue";
import UsageRecord from "../views/usageRecord.vue";
import Payment from "../views/payment.vue";
import ReportLoss from "../views/reportLoss.vue";
import ReportLossList from "@/views/reportLossList.vue";

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      name: "/",
      component: HomeView,
      meta: { title: "智慧生活-共享吹风" },
    },
    {
      path: "/usageRecord",
      name: "usageRecord",
      component: UsageRecord,
      meta: { title: "智慧生活-共享吹风" },
    },
    {
      path: "/payment",
      name: "payment",
      component: Payment,
      meta: { title: "智慧生活-共享吹风" },
    },
    {
      path: "/reportLossList",
      name: "reportLossList",
      component: ReportLossList,
      meta: { title: "智慧生活-共享吹风" },
    },
    {
      path: "/reportLoss",
      name: "reportLoss",
      component: ReportLoss,
      meta: { title: "智慧生活-共享吹风" },
    },
    // {
    //   path: '/list',
    //   name: 'list',
    //   component: list
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue')
    // }
  ],
});

export default router;
